﻿@model Models.Category
@{
    ViewBag.Title = "AddCategory";
}
<div style="float: left; height: 70px"><a href="/admin/index" ><img src="/Content/images/back.png" /></a></div>
<div style="float: left; margin-left: 15px; text-align: center; width: 100px"><a href="/admin/AddCategory" ><img src="/content/images/category_add.png" alt="Add category" /><br />Add category</a></div>
<div style="margin-left: 170px; text-align: center; width: 100px"><a href="/admin/Categories" ><img src="/content/images/category_all.png" alt="All Categories" /><br />All Categories</a></div>

<h2>Add Category</h2>

@if(ViewBag.Message != null)
{
    @ViewBag.Message;
}
else
{
    using (Html.BeginForm())
    {
        @Html.ValidationSummary()
        <table id="table_admin">
            <tr>
                <td>
                    Name
                </td>
                <td>
                    @Html.TextBoxFor(x => x.Name)
                </td>
            </tr>
            <tr>
                <td>
                    Description
                </td>
                <td>
                    @Html.TextBoxFor(x => x.Description)
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" name="subAddCategory" value="Add"/>
                </td>
            </tr>
        </table>
    }
}